#include "Family.h"
#include "d:/SVN/MDF/Src/lib/serialization/memento.h"

using namespace wmdf;

CFamily::CFamily(void)
{
}

CFamily::~CFamily(void)
{
}

bool CFamily::SaveState(Memento* m)
{
  return true;
}

bool CFamily::LoadState(Memento* m)
{
  m_name = m->GetString("name");
  m_address = m->GetString("address");

  int child_num=m->GetChildCount();
  for(int i=0; i<child_num; ++i)
  {
    Memento* child_m=m->GetChild(i);
    CPerson* pd = new CPerson;
    pd->LoadState(child_m);
    m_arrPerson.push_back(pd);
  }

  return true;
}